package top.sqdpt.pt.statemachine.translate;

import lombok.Builder;
import lombok.Data;
import top.sqdpt.pt.statemachine.event.PtStateEvent;


/**
 * 开始状态+事件=结束状态。这歌过程称之为转化。
 * @param <S> 状态枚举
 * @param <E> 事件枚举
 */
@Builder
@Data
public class PtStateTranslate<S extends Enum<S>, E extends Enum<E>> {
    private S sourceState;
    private S targetState;
    private PtStateEvent<S, E> stateEvent;

    public PtStateTranslate(S sourceState, S targetState, PtStateEvent<S, E> stateEvent) {
        this.sourceState = sourceState;
        this.targetState = targetState;
        this.stateEvent = stateEvent;
    }
}
